Image processing apparatus and image processing method

ABSTRACT

Provided is an image processing apparatus for extracting embedded information from a printed document, including: a first obtaining unit configured to obtain a printing method of the printed document; a second obtaining unit capable of obtaining first image data by reading the printed document while applying light to the printed document; a third obtaining unit capable of obtaining second image data by reading the printed document without applying light to the printed document; and an extraction unit configured to extract the embedded information by using at least one of the first image data and the second image data according to the printing method obtained by the first obtaining unit.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to a technique for extracting embedded information from a printed document.

Description of the Related Art

A technique for embedding management information at the time of printing an electronic document onto paper has been known. International Publication No. WO2000/070585 (hereinafter referred to as Document 1) discloses an example in which an information-embedded portion of a printed document is lighted with an auxiliary light to accurately read the printed document or the embedded information within a focal length.

SUMMARY OF THE INVENTION

Here, in a case of capturing an image with lighting using an auxiliary light as in Document 1, the captured image may have poor image quality depending on the printing method of the printed document. This may lead to a failure to extract the embedded information.

An image processing apparatus according to one aspect of the present invention is an image processing apparatus for extracting embedded information from a printed document, including: a first obtaining unit configured to obtain a printing method of the printed document; a second obtaining unit capable of obtaining first image data by reading the printed document while applying light to the printed document; a third obtaining unit capable of obtaining second image data by reading the printed document without applying light to the printed document; and an extraction unit configured to extract the embedded information by using at least one of the first image data and the second image data according to the printing method obtained by the first obtaining unit.

Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating a system configuration;

FIG. 2 is a flowchart illustrating a flow of printing a printed document of an original;

FIG. 3 is a diagram illustrating an example of a page image;

FIGS. 4A and 4B are diagrams illustrating an example of masks;

FIGS. 5A and 5B are diagrams illustrating patterns formed by the masks;

FIGS. 6A and 6B are diagrams illustrating an example of masks;

FIGS. 7A and 7B are diagrams illustrating patterns formed by the masks;

FIG. 8 is a flowchart illustrating a flow of copying a printed product of an original;

FIG. 9 is a diagram illustrating spatial frequency characteristics of patterns used in embedding;

FIG. 10 is a diagram illustrating details of an alteration check process;

FIGS. 11A and 11B are diagrams explaining a pattern enhancement mask;

FIGS. 12A and 12B are diagrams explaining a modification of an embedding method;

FIG. 13 is a diagram illustrating a system configuration of a mobile terminal;

FIG. 14 is a flowchart illustrating a flow of extracting document ID information;

FIGS. 15A and 15B are diagrams explaining a dark portion;

FIG. 16 is a flowchart illustrating a flow of extracting document ID information;

FIG. 17 is a flowchart illustrating a flow of extracting document ID information;

FIG. 18 is a flowchart illustrating a flow of extracting document ID information;

FIG. 19 is a flowchart illustrating a flow of extracting document ID information;

FIG. 20 is a flowchart illustrating a flow of determining a printing method; and

FIGS. 21A and 21B are schematic diagrams of inkjet- and electrophotographic-type multi-function printers (MFPs).

DESCRIPTION OF THE EMBODIMENTS

Embodiments of the technique of the present disclosure will be described using the drawings. Note that the following embodiments do not limit the invention according to the claims, and not all the combinations of the features described in these embodiments are necessarily essential for the solution provided by the invention.

Note that examples in which document ID information is used as embedded information will be described in the following embodiments. Also, examples in which an original is certified will be described specific modes of use. Terms in these examples are defined as below. In this specification, an “original” means an electronic document (digital document) registered and managed along with information indicating that its contents are genuine, and a “printed product of an original” means a printed product printed by using data of such an electronic document. Thus, for example, an official document issued by a government office, such as a “copy of a certificate of residence” as mentioned earlier, is a “printed product of an original”. Also, a “copied product of an original” means a printed product obtained by copying a “printed product of an original” with an image processing apparatus having a copy function. Thus, for example, a photocopy of a “copy of a certificate of residence” mentioned above is a “copied product of an original”. Note that the embodiments to be described below are not limited to the case of certifying an original but are applicable to multiplexing processes in general which involve embedding predetermined information in a sheet in such a form as to be make the information difficult to visually recognize for the user.

Embodiment 1 <System Configuration>

FIG. 1 is a block diagram illustrating a configuration of a printing system according to the present embodiment. As illustrated in FIG. 1 , this printing system has an MFP 40 and an MFP 60 as printing apparatuses and a PC 20 as a host apparatus. The MFP 40 has a plurality of functions such as a printer function and a scanner function and also has a copy function which involves combination of the two functions. The MFP 40 may further have the function of saving and sending image data to be printed and the function of sending and receiving faxes. In the following, hardware configurations of the MFP 40 and the PC 20 will be described.

FIGS. 21A and 21B are exterior views of the MFPs. FIG. 21A illustrates a schematic diagram of the MFP 40, which is of an inkjet type, and FIG. 21B illustrates a schematic diagram of the MFP 60, which is an electrophotographic type. The MFP 40 employs an inkjet method as its printing method, and has a scanner part 2102 and a print part 2103. The print part 2103 has a print head 2104 and an ink tank unit 2105. The print head 2104 ejects inks according to print data. The ink tank unit 2105 stores the inks to be supplied to the print head 2104. The stored inks are cyan, magenta, yellow, and black inks. Depending on the model, an ink of a particular color or the like is separately held. The MFP 60 employs an electrophotographic method as its printing method, and has a scanner part 2112 and a print part 2113. Inside the print part 2113, there are photosensitive drums 2114 and a transfer roller 2115. The print unit 2113 holds a photosensitive drum 2114 for each ink color, and these are for cyan, magenta, yellow, and black, respectively. Latent images are formed on the photosensitive drums according to print data. The transfer roller 2115 transfers the formed latent images onto a conveyed sheet to perform a printing process.

The main body of the MFP 40, which employs an inkjet method as its printing method, includes the following elements as main elements. A CPU 41 is an arithmetic processing device that comprehensively controls the entire MFP 40, and executes, for example, a copying process and so on to be described later in accordance with programs held in a ROM 43 and a RAM 42. The RAM 42 is a volatile storage and temporarily holds programs and data. The ROM 43 is a non-volatile storage and holds table data and programs to be used in various processes to be described later. A data transfer interface (DATA TRANSFER I/F) 44 controls sending and receiving of data to and from the MFP 60 and the PC 20. A print controller (PRINT Controller) 45 controls the heating operation of a heater mounted on the print head not illustrated and ejects the inks based on print data. An image processing accelerator (Image Processing Accelerator) 46 is an arithmetic processing device capable of executing image processing at a higher speed than the CPU 41 does. Note that the image processing accelerator 46 is not necessarily essential. Depending on the printer's specifications and the like, the above-described table parameter creation process and image processing may be executed solely by processing by the CPU 41. A scanner controller (SCANNER Controller) 47 performs operations such as controlling the lighting of an LED mounted on a scanner unit not illustrated, obtaining information on the amount of light from the scanner unit, and controlling write to the RAM 42. In this way, an image of a document set on a platen glass not illustrated is read. A motor controller (MOTOR Controller) 48 controls a plurality of motor units not illustrated to, for example, move the print head relative to a print sheet and move the scanner unit relative to a document.

The main body of the MFP 60, which employs an electrophotographic method as its printing method, has a similar configuration to that of the main body of the MFP 40, which employs an inkjet method, but the printing device part is different. A print controller (PRINT Controller) 65 performs a printing process by developing images on the drum surfaces and transferring them according to print data based on control parameters from predetermined addresses in a RAM 62. Note that the configurations of the MFPs 40 and 60 are not limited to the illustrated ones and may, for example, include a network interface that connects to an external network and communicates with other external PCs or the like.

The PC 20 includes the following elements as main elements. A CPU 21 is an arithmetic processing device that comprehensively controls the entire PC 20, and executes, for example, an original printing process and so on to be described later in accordance with programs held in an HDD 23 and a RAM 22. The RAM 22 is a volatile storage and temporarily holds programs and data. The HDD 23 is a non-volatile storage and likewise holds programs and data. A data transfer interface (DATA TRANSFER I/F) 24 controls sending and receiving of data to and from the MFPs 40 and 60. As a connection method for this sending and receiving of data, a wired connection using USB, IEEE 1394, a LAN, or the like or a wireless connection using Bluetooth or Wi-Fi is usable. A keyboard-mouse interface (KEY BOARD MOUSE I/F) 25 is an interface that controls human interface devices (HIDs), such as a keyboard and a mouse. A display interface (DISPLAY I/F) 26 performs display control on a display not illustrated. A network interface (Network I/F) 27 connects the PC 20 to an external network, and communicates with one or more external PCs to perform operations such as issuing a request to perform document ID matching, requesting its result, and requesting document data.

<Original Printing Process>

Next, a flow of printing an electronic document which is an original will be described with reference to the flowchart of FIG. 2 . The series of processes illustrated in the flowchart of FIG. 2 starts in response to the user selecting an electronic document to be printed and issuing an instruction to perform printing including embedding information indicating genuineness of the electronic document via a user interface (UI) of a predetermined printing application installed in the PC 20. Note that each symbol “S” in the following description means a step.

In S201, data of the electronic document designated as a printing target is obtained. In the present embodiment, electronic documents of various originals are stored and managed in an external PC not illustrated. Via the network interface 27, the PC 20 sends a request to obtain the particular electronic document to the external PC, and receives and obtains data for printing the designated electronic document, specifically PDL data, from the external PC. Here, PDL stands for Page Description Language and is formed of a set of page-by-page draw commands. The definitions of types of draw commands vary depending on the PDL specification. In the present embodiment, mainly the following three types are exemplarily used.

TEXT draw command: (X1, Y1, color, font information, character string information)

BOX draw command: (X1, Y1, X2, Y2, color, applied shape)

IMAGE draw command: (X1, Y1, X2, Y2, image file information)

Besides the above three types, there are a DOT draw command to draw dots, a LINE draw command to draw a line, a CIRCLE draw command to draw an arc, and the like, and these draw commands are used depending on the application. Frequently and generally used PDLs include Portable Document Format (PDF) proposed by Adobe Inc., XPS proposed by Microsoft Corporation, HP-GL/2 proposed by Hewlett-Packard Company, and so on.

FIG. 3 is a diagram illustrating an example of an image of one page of an electronic document (hereinafter referred to as “page image”). Now, suppose that the size of a page image 300 illustrated in FIG. 3 is 600 pixels in width and 900 pixels in height. The following is a PDL corresponding to the page image 300.

<PAGE=001>  <TEXT> 50,50, 550, 100, BLACK, STD-18,   “ABCDEFGHIJKLMNOPQR” </TEXT>  <TEXT> 50,100, 550, 150, BLACK, STD-18,   “abcdefghijklmnopqrstuv” </TEXT>  <TEXT> 50,150, 550, 200, BLACK, STD-18,   “1234567890123456789” </TEXT>  <BOX> 50, 300, 200, 450, GRAY, STRIPE </BOX>  <IMAGE> 250, 300, 550, 800, “PORTRAIT.jpg” </IMAGE> </PAGE>

<PAGE=001> in the first line of the above PDL is a tag indicating the number of pages. Usually, PDLs are designed to be capable of describing a plurality of pages, and a tag indicating page partition is written in a PDL. The above example indicates that a section down to </PAGE> in the ninth line is the first page. In a case where there is a second page, <PAGE=002> is written. From <TEXT> in the second line to </TEXT> in the third line is a TEXT draw command. In the TEXT draw command, the first two coordinates indicate the coordinates (X1, Y1) of the upper left corner of a drawing region, and the subsequent two coordinates indicate the coordinates of (X2, Y2) of the lower right corner of the drawing region. The subsequent part of the second line describes “BLACK (black color: R=0, G=0, B=0)” as the color, “STD (standard”) as the character font, 18 as the character size, and “ABCDEFGHIJKLMNOPQR” as a character string to be drawn. From <TEXT> in the fourth line to </TEXT> in the fifth line and from <TEXT> in the sixth line to </TEXT> in the seventh line are TEXT draw commands as well. The character strings to be drawn are “abcdefghijklmnopqrstuv” and “1234567890123456789”. From <BOX> to </BOX> in the eighth line is a BOX draw command, in which the first two coordinates indicate the coordinates (X1, Y1) of the upper left corner as the point to start the drawing, and the subsequent two coordinates indicate the coordinates (X2, Y2) of the lower right corner as the point to end the drawing. Next, “GRAY (gray color: R=128, G=128, B=128)” is designated as the color, and “STRIPE (stripe pattern)” is designated as the pattern to be applied. The ninth line is an IMAGE draw command. The first two coordinates indicate the coordinates (X1, Y1) of the upper left corner of a drawing region, and the subsequent two coordinates indicate the coordinates of (X2, Y2) of the lower right corner of the drawing region. Moreover, “PORTRAIT.jpg” is described as the file name of an image to be present in the designated drawing region. Note that “.jpg” is an identifier and indicates that the file is in JPEG, a commonly used image compression format. Finally, </PAGE> in the 10th line is a description indicating the end of the drawing of the page. Note that document data to be actually obtained is often a combination of PDL data and font data and an image file(s) added thereto. This is because, in a case of separately managing the font data and the image file(s), the text and image portions cannot be formed only with draw commands and there is not enough information to form the image(s) to be printed. In S201, document data including PDL data as described above is obtained by accessing an external PC.

In S202, information indicating genuineness of the electronic document to be printed is obtained. In the present embodiment, via the network interface 27, the PC 20 sends a request to obtain the information indicating the genuineness of the electronic document to the above external PC and receives and obtains the information therefrom. Here, document ID information is used as the information indicating the genuineness of the electronic document. The document ID information is information with a predetermined number of bits (32 bits in the present embodiment) calculated based on the above document data (data in which PDL data, font data, are an image file(s) are combined) by using a hash function. If even one byte of digital data forming an electronic document is changed, different document ID information is calculated. Thus, a single electronic document is associated with a unique document ID. Note that a plurality of external PCs may cooperate with each other to store and manage electronic document files and their document ID information, and a system configuration like a blockchain may be employed. This reduces the risk of alteration of the document ID information. Incidentally, in a case where the PC 20 has an enough resource to manage document ID information within the PC 20, it is also possible to perform a matching process internally.

In S203, a rendering process is executed based on the document data obtained in S201. In this rendering process, each draw command contained in the PDL data is executed to generate bitmap image data including color information of each pixel. For example, in the case of the page image 300 in FIG. 3 mentioned above, a 600×900 pixel bitmap image is generated. In the present embodiment, each pixel of the bitmap image has 8-bit or 256 levels for each of R, G, and B.

In S204, a process of embedding the document ID information obtained in S202 into the bitmap image generated in S203 is executed. The process of embedding the document ID information into the bitmap image is called “multiplexing process”, “multiplexing encoding process”, or the like. In a case of copying a printed product obtained by printing the bitmap image subjected to this multiplexing process, it is possible to extract (decode) the document ID information from the scanned image of the printed product and determine whether the printed product to be copied is a “printed product of an original”.

Handling information on an information processing apparatus such as the PC 20 essentially means handling binary data. Binary data is information expressed with a combination of “0” and “1”, and information of this “0” and/or “1” is connected in a sequence to have a specific meaning. For example, in a case of handling the English word “hello” with binary data in, for example, Shift JIS, which is one of character encodings, the alphabetical character “h” corresponds to binary data “01101000”. Similarly, “e” corresponds to binary data “01100101”, “1” corresponds to binary data “01101100”, and “o” corresponds to binary data “01101111”. That is, the character string “hello” can be expressed with binary data “0110100001100101011011000110110001101111”. In other words, if binary data “0110100001100101011011000110110001101111” can be obtained, text information representing the English word “hello” can be obtained. Based on this idea, multiplexing can be implemented by embedding predetermined data in an image such that “0” and/or “1” can be determined.

<Multiplexing Process>

FIGS. 4A and 4B are an example of masks formed of 8×8 pixels each used to generate “0” or “1”. FIG. 4A is a mask for generating “0”, and FIG. 4B is a mask for generating “1”. By adding the values in the masks to the pixel values in a bitmap image, it is possible to provide a periodic pattern in 8×8 pixel regions in the image. As mentioned above, a bitmap image in the present embodiment is expressed with 8 bits per color, and each pixel is given one of values of 0 to 255. Values outside the range of 0 to 255 cannot be used as image data. Thus, in a case where the addition results in a value less than 0 or more than or equal to 256, the value of the sum is usually replaced with 0 or 255 to be within the effective range. The masks in FIGS. 4A and 4B give changes of “−10” and “0”. In a case where the pixel values of a region in a bitmap image to be masked are all “0”, the values in that region will be all “0”. Note that a case of using 8 bits per color is described here, but the number of bits is not limited to this number. In a case of handling digital images, there is always an effective range regardless of the number of bits to be used to express them, and it is impossible to apply such a change as to bring pixel values outside the range.

FIGS. 5A and 5B are diagrams visually illustrating the patterns to be formed in a bitmap image with the masks in FIGS. 4A and 4B mentioned above. The positions of “−10” in the masks in FIGS. 4A and 4B are expressed with solid black, and the positions of “0” are expressed with hatching. As can be seen from FIGS. 5A and 5B, in the bitmap image after the masks are applied, a diagonal line extending downward to the left appears as a “pattern representing 0” and a diagonal line extending downward to the right appears as a “pattern representing 1”.

Here, the following represents pseudocode for alternately applying the mask in FIG. 4A and the mask in FIG. 4B to an entire bitmap image.

01: int i, j, k, l; 02: int width = 600, height=900; 03: unsigned char *data = image data; 04: int **maskA = mask data; 05: bool isMaskA = true; 06: for(j = 0; j<height; j+=8){ 07:  for(i = 0; i<width; i+=8){ 08:    for(k = 0; k<8; k++){ 09:     for(l = 0; l<8; l++){ 10:     if(isMaskA == true){ 11:       data[(i+k)+(j+l)*width] += maskA[k][l]; 12:      } 13:     } 14:    } 15:   } 16:  }

In the present embodiment, the embedding of pattern data described above is performed only on the B value in the RGB value of each pixel in the bitmap image. This is because, in the case of performing printing on a paper white region of a sheet with the four kinds of inks, or the C, M, Y, and K inks, the Y ink is less visible than the other C, M, and K inks. In the multiplexing, it is preferable to minimize the impact of the above pattern to be embedded on the original image, that is, to make the pattern as less visible as possible. R, G, and B, which are the three primary colors of light, and C, M, and Y, which are the three primary colors of pigment, are related as complementary colors such that R and C, G and M, and B and Y are pairs with opposite hues. This means that modulating the B value in an RGB value greatly changes the amount of the Y ink to be used. Thus, in the present embodiment, the density of the Y ink is controlled to change greatly by modulating only the B value in the RGB value.

Here, in the case of the above-mentioned page image 300 illustrated in FIG. 3 , there is a sufficiently large paper white region. The region other than a TEXT drawing region 301, a BOX drawing region 302, and an IMAGE drawing region 303 is the paper white region. In this case, with the masks illustrated in FIGS. 4A and 4B, the pattern data sometimes cannot be embedded well in all drawing regions other than the paper white region. For example, a solid black (R=0, G=0, B=0) drawing region will be the same solid black (R=0, G=0, B=0) region even after the embedding. Thus, it is preferable to, for example, apply masks as illustrated in FIGS. 6A and 6B in a case of embedding pattern data into a non-paper white region, in particular, an image drawing region. The masks in FIGS. 6A and 6B are masks that apply changes of “−10”, “0”, and “+10” to the pixels in a bitmap image. With the masks in FIGS. 6A and 6B, even in a case where the pixel values of a region in a bitmap image to be masked are all “0”, the pixel values in this region will be “0” or “+10”. In this way, pattern data can be embedded into all pixels in a bitmap image. FIGS. 7A and 7B are diagrams visually illustrating the patterns to be applied to a bitmap image with the masks in FIGS. 6A and 6B. The positions of “−10” in the masks in FIGS. 6A and 6B are expressed with solid black, the positions of “0” are expressed with hatching, and the positions of “+10” are expressed with solid white. As can be seen from FIGS. 7A and 7B, in the bitmap image after the masks are applied, a plurality of diagonal lines differing in density and extending downward to the left appear as a “pattern representing 0”, and a plurality of diagonal lines differing in density and extending downward to the right appears as a “pattern representing 1”. Note that, it is preferable to apply the masks in FIGS. 4A and 4B to TEXT drawing regions and BOX drawing regions since the proportion of a paper white region is usually likely to be large in these drawing regions. However, there are cases where it is preferable to apply the masks in FIGS. 6A and 6B to TEXT drawing regions and BOX drawing regions depending on the designated color, weight of characters, and so on. Also, even an IMAGE drawing region can sometimes be very similar to a paper white region. For this reason, the type of masks to be applied may be determined by, for example, obtaining a density histogram of each drawing region. For example, the masks in FIGS. 4A and 4B may be applied in a case where the largest RGB value is more than a threshold value, and the masks in FIGS. 6A and 6B may be applied in a case where the largest RGB value is less than or equal to the threshold value. Alternatively, in a case where the input color space is L*a*b*, the masks to be applied may be switched by comparing the L* value, which indicates luminance, with a threshold value. In this way, it is possible to implement reliable embedding.

The description now returns to the flowchart of FIG. 2 .

In S205, a print image is generated based on the multiplexed bitmap image generated in S204 (hereinafter referred to as “multiplexed image”). A publicly known method may be used for the generation of this print image. In the present embodiment, processes including a color conversion process, a color separation process, an output characteristic conversion process, and a quantization process are performed on each pixel of the multiplexed image. Each process will now be described.

(Color Conversion Process)

The color conversion process is a process of converting the pixel values (RGB values) of the multiplexed image such that the pixel values can be suitably reproduced on the MFP 40. Color values typically designated in PDL draw commands are color values set to be suitably expressed on displays. If those values are directly output to a printer, colors are output with different tonality from that viewed on a display. Thus, a color conversion process of absorbing this color difference is performed. In this color conversion process, a three-dimensional lookup table (LUT) is used in which combinations of input pixel values (Rin, Gin, Bin) in the multiplexed image are associated with suitable combinations of output pixel values (Rout, Gout, Bout). Now, Rin, Gin, and Bin, which are input values, each have 256 levels. It is therefore ideal to prepare a table having 256×256×256 or a total of 16,777,216 sets of output values (Rout, Gout, Bout) shown below (Table1[256][256][256][3]).

Rout=Table1[Rin] [Gin] [Bin] [0]

Gout=Table1[Rin] [Gin] [Bin] [1]

Bout=Table1[Rin] [Gin] [Bin] [2]

Note that a publicly known technique to reduce the table size may be used, such as reducing the number of LUT grids from 256 to, for example, 16 and interpolating the table values between the grids to determine output values between the grids.

(Color Separation Process)

The color separation process is a process of converting Rout, Gout, and Bout, which are the output values of the color conversion process, into output values of the ink colors to be used to perform inkjet printing on a sheet (here, the four colors of C, M, Y, and K). There are various methods to implement this color separation process as well. In the present embodiment, a three-dimensional lookup table (Table2[256][256][256][4]) is used in which the combinations of output pixel values (Rout, Gout, Bout) mentioned above are associated with combinations of the following ink-color pixel values (C, M, Y, K).

C=Table2[Rout][Gout][Bout][0]

M=Table2[Rout][Gout][Bout][1]

Y=Table2[Rout][Gout][Bout][2]

K=Table2[Rout][Gout][Bout][3]

In this case, it is preferable that only the Y value in a CMYK value corresponding to the result of the modulation of a paper white region in the multiplexing process in S204 have a value above 0. More specifically, the CMYK value of a region whose pixel value has been converted from R=255, G=255, and B=255 to R=255, G=255, and B=245 is preferably such that the Y value is above 0 and the C, M, and K values are less than the Y value and close to 0. This is because it is desired to lower the visibility of the pattern to be embedded, as described in S204. Note that a publicly known technique to reduce the table size may be used, as with the case of the above color conversion process.

(Output Characteristic Conversion Process)

The output characteristic conversion process is a process of converting the density of each of the ink colors C, M, Y, and K into a print dot number ratio. Specifically, for example, the 256-level density of each color is converted into a 1024-level print dot number ratio of the color. In this output characteristic conversion process, one-dimensional lookup tables (Table3[4][256]) are used in which the following print dot number ratios (Cout, Mout, Yout, Kout) corresponding to the densities of the respective ink colors are set.

Cout=Table3[0][C]

Mout=Table3[1][M]

Yout=Table3[2][Y]

Kout=Table3[3][K]

Note that a publicly known technique to reduce the table size may be used, as with the case of the above color conversion process and color separation process.

(Quantization Process)

The quantization process is a process of converting the above print dot number ratio of each ink color (Cout, Mout, Yout, Kout) into the following quantized value (Cdot, Mdot, Ydot, Kdot) indicating whether to print or not to print a dot for each pixel.

Cdot=Halftone[Cout][x][y]

Mdot=Halftone[Mout][x][y]

Ydot=Halftone[Yout][x][y]

Kdot=Halftone[Kout][x][y]

The above are quantized values for dithering. For each pixel position, it is possible to obtain a value indicating whether to print or not to print a dot for each ink color by comparing a threshold value in a dither matrix corresponding to the pixel position. Here, the probability of generation of a print dot of each color is Cout/1023, Mout/1023, Yout/1023, or Kout/1023. Note that the method of the quantization process is not limited to dithering and may be another method such as error diffusion, for example.

By sequentially executing the above-described processes, a print image is generated from the multiplexed image. The description now returns to the flowchart of FIG. 2 .

In S206, the data of the print image generated in S205 is sent to the MFP 40 or another printer not illustrated along with an instruction to print the print image, and the destination printer executes a printing process.

The above is a flow until a printed product of an original is generated. Note that, in the present embodiment, the B value in the RGB value is modulated in the multiplexing process (S204), but the CMYK value may be modulated. In this case, it is necessary to use a positive value for the modification since the pixel value of a paper white region is Y=0, M=0, C=0, and K=0. In the case of the masks exemplarily illustrated in FIGS. 4A and 4B and FIGS. 6A and 6B mentioned above, the sign of the modulation values in the masks may be reversed, that is, “−10” may be reversed to “+10” and “+10” may be reversed to “−10”. Modulating the CMYK value as above increases controllability for limiting the ink to be applied to a paper white region to the Y ink. On the other hand, modulating the RGB value increases controllability for suppressing changes in hue at the time of embedding pattern data into an image drawing region. Thus, it is preferable to select an appropriate modulation method according to characteristics of the printing process, such as electrophotographic printing or inkjet printing, the ratio of the paper white region, the text region, and the image region in the page image to be printed, and so on.

<Process of Copying “Printed Product of Original”>

Next, a flow of copying a “printed product of an original” being the product of the above-described original printing process with the MFP 40 will be described with reference to the flowchart of FIG. 8 . The series of processes illustrated in the flowchart of FIG. 8 starts in response to the user setting a printed product of an original on the platen glass not illustrated and issuing a copy instruction via a UI of the MFP 40. Note that each symbol “S” in the following description means a step.

First, in S811, the printed product to be copied set on the MFP 40 is read by the incorporated scanner unit (not illustrated). This reading of the printed product involves applying LED light to the printed product placed on the platen glass and converting the reflected light into analog electrical signals with imaging elements, such as CCDs, facing the pixels.

In next S812, the analog electrical signals obtained in S811 are digitalized to obtain a bitmap image with an RGB color space. In this step, image processing including a modulation transfer function (MTF) correction process, an input correction process, a shading correction process, a color conversion process, etc. is performed on the pixels of the bitmap image. Each process will now be described.

<<MTF Correction Process>>

The MTF correction process is a correction process related to resolution among the scanner unit's reading characteristics. In a case of optically reading an image with the scanner unit, the image gets defocused due to displacement from the focused position, the performance limit of the lens itself, and so on. For this reason, the image is fixed to some extent by a filtering process or the like. Here, performing an enhancement process that is so strong as to completely fix the image causes exaggeration of blown-out highlights, image noise, and dust pixels, and the like, thereby making image defects more conspicuous than the actual image. The filtering strength therefore needs to be designed such that the image quality improvement and defects are balanced. The following are an example of edge enhancement filters that increase the pixel value of a center portion of an image by a factor of 5 and decrease the pixel values on the upper, lower, left, and right sides by a factor of −1.

R′[x][y]=R[x][y]×5−R[x−1][y]−R[x+1][y]−R[x][y−1]−R[x][y+1]

G′[x][y]=G[x][y]×5−G[x−1][y]−G[x+1][y]−G[x][y−1]−G[x][y+1]

B′[x][y]=B[x][y]×5−B[x−1][y]−B[x+1][y]−B[x][y−1]−B[x][y+1]

(Input Correction Process)

The input correction process is a process of converting the output value of each CCD (imaging element), which is originally a photon quantity, into lightness matching the sensitivity of the human eyes. In this way, for example, an R′G′B′ signal having 4096 levels for each color is converted into a color intensity value having 1024 levels for each color (R″, G″, B″). In this conversion, the following one-dimensional lookup tables (Table4[4][4096]) are used in which suitable print dot number ratios are set for densities of the respective ink colors.

R″=Table4[0][R′]

G″=Table4[1][G′]

B″=Table4[2][B′]

Note that a publicly known technique to reduce the table size may be used, such as reducing the number of LUT grids from 4096 to, for example, 256 and interpolating the table values between the grids to determine output values between the grids.

(Shading Correction Process)

The shading correction process is a process of reducing color and density unevenness caused by the difference in reading sensitivity between pixel positions resulting from the manufacturing variation and assembly variation of constituent parts of the scanner device, such as its lens, LED, and CCDs. For example, an R″G″B″ signal having 1024 levels for each color is converted into a color intensity value having 256 levels for each color (R′″, G′″, B″). In this conversion, the following one-dimensional lookup tables (Table5[x][3][1024]) are used in which a density adjustment value is specified for each pixel position in an X direction (the direction along which the scanner lens is disposed).

R′″=Table5[x][0][R″]

G′″=Table5[x][1][G″]

B′″=Table5[x][2][B″]

Note that a publicly known technique to reduce the table size may be used, as with the case of the above input correction process.

(Color Conversion Process)

The color intensity value having 256 levels for each color (R′″, G′″, B″) calculated by the above processes so far is a set of values specific to the scanner unit, as opposed to the color conversion process performed in the printing. The color conversion process performed here is a process of converting the value specific to the scanner unit into an RGB value (values Rout, Gout, and Bout) suitable for displaying the specific values on a display. Now, R′″, G′″, and B′″, which are the input values, each have 256 levels. Thus, in this conversion, the following three-dimensional lookup table (Table6[256][256][256][3]) having 256×256×256 or a total of 16,777,216 sets of output values is used.

Rout=Table1[R′″][G′″][B′″][0]

Gout=Table1[R′″][G′″][B′″][1]

Bout=Table1[R′″][G′″][B′″][2]

Note that a publicly known technique to reduce the table size may be used, as with the case of the above input correction process and shading correction process. The bitmap image is obtained in this manner.

In next S813, a document ID information extraction process is executed on the bitmap image obtained in S812. Specifically, a process is performed in which whether a pattern representing “0” or “1” as mentioned earlier is formed in the bitmap image is determined in units of a predetermined region (here, 8×8 pixels), and number sequence information represented by “0” and “1” is taken out. By repeating this across the entire bitmap image, the document ID information embedded by the multiplexing process at the time of printing the original is decoded. The information embedded by the multiplexing process may be called “embedded information” or “multiplexed information”. The process of decoding the embedded information will now be specifically described.

(Process of Decoding Embedded Information)

First, the position where the embedded information is embedded in the obtained bitmap image is detected. The embedded position can be detected by analyzing spatial frequency characteristics of each unit region (here, 8×8 pixel region). FIG. 9 is a diagram illustrating spatial frequency characteristics of patterns used in embedding. The horizontal axis represents frequencies in the horizontal direction while the vertical axis represents frequencies in the vertical direction. The farther from the origin, the higher the frequency. In the present embodiment, two types of patterns corresponding respectively to “0” and “1” have been embedded in the image (see FIGS. 5A and 5B and FIGS. 7A and 7B). In the embedding, a value “10” is subtracted from the B component among the R, G, and B components (in the case of using the masks in FIGS. 4A and 4B. A value “10” is added and subtracted in the case of using the masks in FIGS. 6A and 6B). Thus, in a case where, for example, a pattern extending downward to the left is formed in the image with the mask in FIG. 4A, the pattern generates a large power spectrum on a line A02. Likewise, in a case where a pattern extending downward to the right is formed in the image with the mask in FIG. 4B, the pattern generates a large power spectrum on a line A01. Thus, by detecting one of these power spectra, data of “0” or “1” can be extracted. Note that performing edge detection as pre-processing for the power spectrum detection can intensify the power spectra.

In the data extraction by the frequency analysis described above, the analysis region needs to be accurately cut out of the image data. For this reason, a process of correcting misalignment of coordinate positions is performed as well. For example, firstly, a unit region is cut out of the bitmap image and subjected to the frequency analysis. These operations are repeated in the vertical and horizontal directions while shifting the region by one pixel. In a case where the image size is 600 pixels in width and 900 pixels in height, the operations are repeated 64 times in total. Then, the position at which the spectrum becomes most intense is set as a reference position for cutting. Thereafter, using the reference position as a base point, the embedded information is extracted. In this way, the embedded number sequence of “0” and/or “1” can be accurately obtained.

In the present embodiment, as described in S204, the embedded information is text data, and its character codes have been converted into numerical values in “Shift JIS”. In this case, with 1-byte codes (half-width characters) in Shift JIS, for example, the alphabetical character “h” corresponds to binary data “01101000”, “e” corresponds to “01100101”, “1” corresponds to “01101100”, and “o” corresponds to “01101111”. Thus, in a case where the number sequence of the extracted embedded information is “0110100001100101011011000110110001101111”, a character string of the English word “hello” is obtained. The document ID information embedded as embedded information is extracted in this manner.

The description now returns to the flowchart of FIG. 8 .

In next S814, it is determined whether the document ID information has been successfully extracted in S813. The processing proceeds to S815 if the document ID information has been successfully extracted, and proceeds to S820 if the extraction has failed. Here, there are the following two possibilities as cases of failing to extract the document ID information. One is a case (possibility 1) where no document ID information was embedded in the printed product to be copied in the first place. The other one is a case (possibility 2) where document ID information was embedded in the printed product to be copied but the predetermined pattern representing the embedded information cannot be properly detected due to, for example, the printed product being dirty or characters or the like being written by hand afterward. Here, in the case of the possibility 1, the processing may simply proceed to S820. On the other hand, in the case of the possibility 2, the user may be notified of it by, for example, displaying a message indicating that “a genuine document embedded with a document ID (a printed product of an original) is to be copied”. In this way, the user can know that a printed product that may not be genuine is to be copied, and thus is given an opportunity to make a choice to, for example, stop the copying operation. For example, in a case where the result obtained by the extraction process is 1 to 31 bits out of the document ID information having a total of 32 bits, it may be determined that there is the possibility 2, and the user may be notified of that effect. It is not entirely impossible for the image to accidentally include only one pattern similar to the above predetermined pattern. Considering such a rare case, it is preferable to determine that there is the possibility 1 if extracting less than 16 bits, which half of 32 bits, and determine that there is the possibility 2 if extracting 16 to 31 bits.

In next S815, a process of matching the successfully extracted document ID information is performed. In the present embodiment, like the document ID obtaining process in S202, the MFP 40 accesses the external PC to request the external PC to perform matching and obtain the result of the matching. Specifically, via a network I/F not illustrated, the MFP 40 sends the external PC a request to perform matching for determining whether the extracted document ID information has been formally registered and is valid, and receives and obtains the result of the matching from the external PC. Incidentally, in a case where the MFP 40 has an enough resource to manage document ID information within the MFP 40, it is also possible to perform a matching process internally.

Then, in S816, the processing branches based on whether the matching result indicates that the document ID information extracted in S813 has been formally registered and is valid. The processing proceeds to S817 in a case of a valid document ID, and proceeds to S820 in a case of an invalid document ID. Here, in the case of an invalid document ID, the user may be notified of that effect by, for example, displaying a message indicating that “a non-genuine document with an invalid document ID is to be copied”. In this way, the user is given an opportunity to make a choice to, for example, stop the copying operation.

In S817, a process of checking whether the printed product to be copied has been altered (alteration check process). A general flow of this alteration check process is as follows. First, via the network I/F 27, the MFP 40 sends a document data obtaining request to the external PC along with the document ID information. Then, the MFP 40 receives and obtains document data (PDL data) associated with the document ID information from the external PC, and performs a rendering process on this document data. These are pre-processing. Then, the MFP 40 compares the bitmap image obtained by the rendering process and the bitmap image obtained in S812 to determine the presence or absence of alteration. The alteration check process will now be described specifically through another flowchart illustrated in FIG. 10 . Note that in the description of the flow in FIG. 10 , the bitmap image obtained by the rendering process will be referred to as “rendered image”, and the bitmap image obtained by the document reading process will be referred to as “scanned image”.

<Details of Alteration Check Process>

In S1001, a process of initializing a counter that counts pixels determined to have been altered in S1010 to be described later is performed. Specifically, the count of the counter (the number of altered pixels) is set to “0”.

In next S1002, a normalization process is performed on the scanned image obtained in S812. This normalization process is performed to adjust the dynamic ranges of the scanned image and the rendered image to each other. For example, the lightest portion of the scanned image is usually the color of the paper of the read printed product and, in principle, has a value of density. On the other hand, the lightest portion of the rendered image is a pixel with a pixel value of R=255, G=255, and B=255. Also, the darkest portion of the scanned image is the black color of an ink or a toner and, in principle, has a given value of lightness originating from reflected light. On the other hand, the darkest portion of the rendered image is a pixel with a pixel value of R=0, G=0, and B=0. As described above, the two images naturally have different lightest colors and different darkest colors. Also, in a case where the printed product has been output in color mode, the two images have different tonalities. For example, the saturation of the most vivid printable red color in the scanned image is low as compared to the pixel value indicating the most vivid red color in the rendered image (R=255, G=0, B=0). Thus, each pixel value (RGB value) of the scanned image is normalized using Equations (1) to (3) below to derive a new pixel value (Rnorm, Gnorm, Bnorm).

Rnorm=(R−Rd)/(Rw−Rd)×255  Equation (1)

Gnorm=(G−Gd)/(Gw−Gd)×255  Equation (2)

Bnorm=(B−Bd)/(Bw−Bd)×255  Equation (3)

By the normalization process using Equations (1) to (3) above, the RGB value of the lightest color (white) in the scanned image becomes R=255, G=255, and B=255, the RGB value of the darkest color (black) becomes R=0, G=0, and B=0.

In next S1003, a filtering process is performed on the scanned image after the normalization process. This involves performing stronger edge enhancement in order to facilitate the comparison with the rendered image.

In next S1004, a process of removing the image pattern expressing the embedded information from the scanned image after the filtering process is performed. Due to the multiplexing process (S203), there is a difference between the print image generated in S205 in the flow in FIG. 2 described earlier and the actual document image (an image of the electronic document being the original). Thus, the above process is performed to remove this difference as much as possible. Specifically, a process of subtracting the pattern data embedded by the multiplexing process from the scanned image data is performed. This brings the scanned image closer to the state before being subjected to the multiplexing process. In the present embodiment, this process is implemented by adding the values in the masks in FIGS. 4A and 4B or FIGS. 6A and 6B mentioned earlier multiplied by “−1” to the pixels of the scanned image.

Then, in S1005, a process of comparing the scanned image from which the embedded information has been removed and the rendered image is performed. Specifically, a process of deriving difference values (ΔR, ΔG, ΔB) represented by Equations (4) to (6) below is performed by comparing the rendered image and the scanned image after the removal of the embedded information on a pixel-by-pixel basis.

ΔR=|R[x][y] in Rendered Image−R[x][y] in Scanned Image|  Equation (4)

ΔG=|G[x][y] in Rendered Image−G[x][y] in Scanned Image|  Equation (5)

ΔB=|B[x][y] in Rendered Image−B[x][y] in Scanned Image|  Equation (6)

Then, in S1006, it is determined whether any of the difference values (ΔR, ΔG, ΔB) obtained in S1005 is above a threshold value. In the present embodiment, the difference values (ΔR, ΔG, ΔB) are compared with threshold values (Rth, Gth, Bth) provided in advance for the R, G, and B channels, respectively. The processing proceeds to S1007 if any of ΔR, ΔG, and ΔB is above the corresponding threshold value, and proceeds to S1008 if none of ΔR, ΔG, and ΔB is above the corresponding threshold value. Note that the threshold values are determined with characteristics of the scanner unit and the printing apparatus and the like taken into consideration. In the present embodiment, values such as Rth=Gth=Bth=64 may be set, for example.

In S1007, the count value of the counter indicating the number of altered pixels is incremented (by one). The processing proceeds to S1008 after the counter is incremented. Then, in S1008, it is determined whether the comparison of the pixel values has been completed for all pixels. If there is a pixel(s) yet to be processed, the processing returns to S1005 and is continued therefrom. If the comparison of the pixel values has been completed for all pixels, the processing proceeds to S1009.

In S1009, it is determined whether the count value of the counter indicating the number of altered pixels is above a threshold value. Considering inclusion of dust at the time of obtaining the scanned image and other similar cases, a value such, for example, as 3% of the number of all pixels may be set as the threshold value in this step. The processing proceeds to S1010 if the count value is above the threshold value, and proceeds to S1011 if the count value is not above the threshold value.

In S1010, the result of the alteration check process is determined as not altered, and the processing is terminated. On the other hand, in S1011, the result of the alteration check process is determined as altered, and the processing is terminated.

The above is the details of the alteration check process. Note that, in the present embodiment, the comparison is done on a pixel-by-pixel basis but is not limited to this manner. It may be done in a larger size by, for example, comparing average values of chunks of pixels. After the alteration check process ends, the processing proceeds to S818 in FIG. 8 .

The description now returns to the flowchart of FIG. 8 .

In S818, the processing branches based on the result of the alteration check process on the bitmap image obtained in S812. The processing proceeds to S819 if no alteration is present, and proceeds to S820 if alteration is present. Note that if the result of the alteration check process indicates that alteration is present, the user may be notified of that effect by, for example, displaying a message indicating that “an altered document is to be copied”. In this way, the user is given an opportunity to make a choice to, for example, stop the copying operation.

Then, in S819, a process of adding information serving as an indication of a copy of a “printed product of the original” to the bitmap image obtained in S812 is performed. By applying an embedding method (e.g., modulation of R, G, and B values) that gives higher visibility than the embedding of the document ID information, what is to be obtained will be easily recognizable as a printed product output as a copy, not as a “printed product of the original”. Also, with this addition process, the user may also be notified that a printed product of the original is to be copied by, for example, displaying such a message. In this way, the user is given an opportunity to make a choice to, for example, stop the copying operation.

<Enhancement of Embedded Pattern in Scanned Image>

The embedded pattern in the bitmap image obtained in S812 is deteriorated due to the printing and scanning. FIG. 11A schematically illustrates the deterioration of a pattern. A mask 1100 is an extracted pattern. A region 1101 is a part of the embedded pattern. A region 1102 is a part of the embedded pattern. As compared to the region 1101, the difference in pixel value from the region other than the embedded pattern is small, and the embedding strength is low.

In the case where the embedded pattern in the scanned image is like the mask 1100, the extracted embedded pattern can be determined to be weak. Also, in a case where an error correction was performed at the time of extracting the document ID information in S813 and a correction was made, the pattern can likewise be determined to be weak. The embedded pattern in the scanned image is enhanced in the case where the embedded pattern is weak. A mask 1103 in FIG. 11B is an enhancement mask created based on the pixel corresponding to the weak portion of the embedded pattern in FIG. 11A.

In a region 1104, a strength to be added to the pixel corresponding to the weak portion of the embedded pattern is set. The strength may be set from the difference between the regions 1101 and 1102, or set uniformly from a predetermined value. With the extracted document ID information, a multiplexing process is performed in a similar manner to S204. At this time, for any region determined as a weak portion of the embedded pattern, an enhancement mask is added to the mask that form the changes in FIG. 4A or 4B, and the multiplexing process is performed. Alternatively, it is also possible to enhance the embedded pattern by generating a pattern based on the created enhancement mask and enhancing the scanned image based on that pattern.

<Reducing Embedded Pattern in Scanned Image and Newly Superimposing Embedded Pattern>

The embedded pattern in the scanned image may be reduced, and a multiplexing process may be performed again. Regarding the method of reducing the embedded pattern, a smoothing filter of a predetermined size is applied to the scanned image. The filter size may be set based on the size of the embedded pattern (here, 8×8). From the embedded pattern, an inverse filter may be calculated and utilized. In a case where the pattern embedding region is a paper white region, a process of changing the pixel values to the value of paper white by under-color removal or the like may be performed. In a case where a particular color plane has been added to the embedded pattern, the above reduction process may be performed only on the particular color.

A multiplexing process is performed to embed the extracted document ID information into the image with the reduced embedded pattern in a similar manner to S204.

In next S820, a print image is generated based on the bitmap image obtained in S812 or the bitmap image subjected to the addition process in S819. Description of this process is omitted since it is equivalent to and not particularly different from S205 in the flow in FIG. 2 described earlier. In next S821, a printing process using the print image generated in S820 is performed.

The above is a process flow for copying of a printed product of an original. Incidentally, instead of performing the notification process, such as displaying a message, in S814, S816, S818, and S819, the processing may be controlled so as to automatically stop the copying process itself at these points. This saves the trouble of confirming the user's intention each time.

Also, the information serving as an indication of a copy, which is added in S819, certifies that the original has not been altered. In other words, it can be seen as “information indicating that the contents are authentic and copied.” Thus, character string information more clearly expressing that the printed product to be copied is a genuine document, such as “copied product of a printed product of the original”, may be added. Moreover, in the case where it is determined that alteration is present in S818, a character string such as “unauthentic (altered) copied product” may be added and then the processing may proceed to the generation of a print image (S820).

Also, the genuine document ID information extracted from the “printed product of the original” to be copied may be updated to document ID information serving as an indication of a copied product, and then embedded into the bitmap image again and output as a print image in S820. In this way, when the printed product embedded with the updated document ID information output in S820 is to be copied, the user can be notified of that effect. In this case, when the document ID information is obtained in the original printing process (S202), the document ID information serving as an indication of a copied product may additionally be obtained and held in the form of reserved ID information or the like. In this way, it is possible to notify the user that what is to be obtained is a copied product without requesting the external PC to perform matching.

As described above, according to the present embodiment, in a case of copying a “printed product of an original”, information indicating this fact is added in the form of visible information that is highly visible. This enables the user to easily recognize that what is to be obtained is a “copied product of the original”. Also, in a case where the user further attempts to copy the “copied product of the original” obtained by the above copying process, it is possible to detect the added information serving as an indication of a copy with the copier and notify the user of that fact.

<Modification 1>

In the above embodiment, an example has been described in which document ID information is multiplexed and embedded in 8×8 pixel unit regions. With this method, a predetermined pattern is formed in a high-frequency region in an image. Hence, information can be embedded in such a fashion as to be difficult to visually recognize for the user. However, the information embedding method is not limited to this method. For example, the document ID information may be converted into a two-dimensional code, which may be embedded in such a fashion as to be difficult to visually recognize.

FIG. 12A illustrates an example of the two-dimensional code, and FIG. 12B illustrates an actual print pattern for the two-dimensional code. The example of FIG. 12B is a pattern in which a single dot can be formed in each 8×8 pixel region. The dot at a black pixel 1201 in the two-dimensional code in FIG. 12A corresponds to a single dot 1202 in the print pattern illustrated in FIG. 12B. That is, none of the dots of the print pattern will be formed at any of the positions of the white pixels in the two-dimensional code in FIG. 12A. A specific process flow to implement this may be as follows. Specifically, in the multiplexing process (S204) in the flow in FIG. 2 described earlier, the document ID information is firstly converted into a two-dimensional code, which is then converted into pattern data with separated dots and embedded into the rendered image in units of a predetermined region. Thereafter, in the next print image generation process (S205), the separated dots are formed only with the Y ink. In this way, it will be more difficult to visually recognize the dots.

Also, in a process of copying a printed product in which document ID information was embedded by the method of the present modification, the document ID information may be extracted by extracting the two-dimensional code pattern formed of yellow dots in units of 8×8 pixels from the read bitmap image and decoding the two-dimensional code.

Also, as an embedding method other than the two-dimensional code embedding method, the multiplexing may be done by, for example, modulating the threshold values in the quantization process.

<Modification 2>

So far, the description has been based on the assumption that, in the process of printing an original, document ID information indicating its genuineness is embedded in such a fashion as to as less visible as possible to the user. However, the document ID information may be embedded in such a fashion as to be easily visible to the user (e.g., by modulating the R value and the G value, which may greatly change the density of the C, M, and K inks).

In this case, in a copying process, the rendered image generated in the pre-processing for the alteration check process (S817) may be printed as is, or the bitmap image from which the embedded data has been removed (S1004) may be printed as is. By performing printing by one of these methods, a printed product is output without the document ID information embedded therein. In this case, since no visible pattern data is printed on the paper white region of the printed product obtained by the copying, the user can easily recognize that the printed product is not a “printed product of the original”. Also, since there is no embedded data on the copied printed product, if the copied printed product is, in turn, to be copied, the determination in S814 will always result in “No”.

In the above, a method in which a scanner is used to extract document ID information from a printed document has been described. However, a mobile terminal, such as a smartphone or a tablet, may be utilized to extract the information. With a mobile terminal, it is possible to capture an image of a printed document by using its image capturing device and extract document ID information from the captured image and process it within the mobile terminal.

In the following, a description will be given of a process of extracting document ID information by capturing an image of a printed document by using a camera function of a mobile terminal and extracting the document ID information from the captured image. In a case of extracting document ID information from a document printed by an inkjet method, lighting the document during the image capture allows for enhanced accuracy of extraction from a dark portion. A dark portion is a region of a printed document where the color has high density, and refers in particular to a region with low lightness, such as a black region.

On the other hand, in a case of capturing an image of a dark portion of a document printed on ordinary paper by an electrophotographic method with the flash on, the wax of the toner strongly reflects the light, which may cause a blown-out highlight. Hence, the blown-out highlight deteriorates the image quality of the captured image and may lower the accuracy of extraction of the document ID information. In the present embodiment, a description will now be given of a method in which, in order to avoid this, images of a document printed by an electrophotographic method are captured with a flash on and also off, and the image from which to extract the document ID information is switched based on whether the printed document includes a dark portion.

FIG. 13 is a block diagram illustrating a system configuration of a mobile terminal. A CPU 1301 executes processes according to programs held in a ROM 1302 or a RAM 1303. The RAM 1303 is a volatile storage and temporarily holds programs or data. The ROM 1302 is a non-volatile storage and likewise holds programs or data. A network I/F (network interface) 1304 connects a mobile terminal 130 and an external network, and communicates with one or more external PCs to perform operations such as issuing a document ID matching request, requesting a result, and requesting document data. A display I/F (display interface) 1305 displays information on a display and receives user operations input via touch-panel operations. A sensor 1306 is a sensor that measures the distance to a subject and the ambient brightness. A camera 1307 captures an image of a subject with exposure and the like adjusted based on the terminal and image capture conditions measured by the sensor 1306. A flash 1308 automatically emits a flash of light when the camera 1307 captures an image in a case where the amount of light measured by the sensor 1306 is low. Alternatively, a user setting or an application setting may be configured to forcibly switch the ON/OFF of the flash. The above is the description of the system configuration of the mobile terminal.

FIG. 14 illustrates a flow of extracting document ID information from a document printed by an electrophotographic method. With FIG. 14 , a description will be given of a method in which the camera 1307 of the mobile terminal 130 is used to perform the document reading process to the document ID information extraction process described in S811 to S813 in FIG. 8 . While the mobile terminal 130 actually performs the processes of S811 to S821 in FIG. 8 , description of the processes of S814 and the subsequent steps is omitted in the present embodiment since these are similar to the processes performed using the PC 20. Note that the CPU 1301 of the mobile terminal 130 performs the processes of the steps in FIG. 14 by loading program code stored in the ROM 1302 to the RAM 1303 and executing it.

In S1401, in response to a user operation, the mobile terminal 130 captures an image of a document with the flash on. Note that the flash may be switched on or off by, for example, causing the mobile terminal 130 to notify the user that the flash is to be turned on or off and having the user perform an operation to permit it as a response to the notification. The mobile terminal 130 may automatically switch the flash on or off in response to a one-time instruction from the user. Then, in S1402, the mobile terminal 130 digitalizes the analog electrical signals obtained in S1401 to obtain a bitmap image.

Then, in S1403, in response to a user operation, the mobile terminal 130 captures an image of the document with the flash off. In S1404, the mobile terminal 130 digitalizes the analog electrical signals obtained in S1403 to obtain a bitmap image. In S1405, the mobile terminal 130 determines whether a dark portion is included in the document based on the obtained bitmap images. The mobile terminal 130 proceeds to S1406 if no dark portion is included, and proceeds to S1407 if a dark portion is included.

FIGS. 15A and 15B are diagrams explaining a dark portion. A document 1501 represents a document with a dark portion, and includes a text region 1502, a rectangular drawing region 1503, and an image region 1504. The rectangular drawing region 1503 is the dark portion, which is a rectangular region in a single color of black. A document 1505, on the other hand, represents a document with no dark portion, and includes a text region 1506.

Whether a dark portion is included is determined in S1405 by calculating the average luminance of each N×N pixels from their RGB values based on the bitmap images obtained by capturing images of the document, and determining N×N pixels as a dark portion if their average luminance is less than a threshold value. The threshold value is, for example, 64/255, which is equivalent to ¼ of the luminance range. This process is performed on the rectangular drawing region 1503 and the image region 1504. Here, for the sake of description, if a dark portion is present at any one region, it is determined that a dark portion is present.

The description now returns to FIG. 14 . In S1406 after determining that no dark portion is present, the mobile terminal 130 sets the bitmap image obtained by capturing an image with the flash on in S1402 as an image from which to extract the document ID information.

On the other hand, in S1407 after determining that a dark portion is present, the mobile terminal 130 sets the bitmap image obtained by capturing an image with the flash off in S1404 as an image from which to extract the document ID information. In S1408, the mobile terminal 130 extracts the document ID information from the set bitmap image. Regarding the subsequent processes, the mobile terminal 130 performs processes similar to S814 to S821 in FIG. 8 .

As described above, according to the present embodiment, it is possible to improve the accuracy of information extraction. Specifically, images of a printed document are captured with the flash on and also off, and the image from which to extract the document ID information is switched based on whether a dark portion is included in the document. Thus, even in a case where a dark portion is included in a document printed by an electrophotographic method, information can be extracted accurately.

In the present embodiment, a case of imaging a document with the flash on and also off has been described as an example. A document may be imaged or scanned a plurality of times with setting of different amounts of light. Alternatively, instead of a mobile terminal, a scanner may be used to scan a document a plurality of times with setting of different amounts of light, and the image from which to extract the document ID information may be switched by similar processes.

Embodiment 2

A mobile terminal may be used not only to read a printed document printed by an electrophotographic method but also to read a document printed by an inkjet method, for example. Note that characteristics of printed documents may differ from each other depending on how they were printed. Thus, using the same reading method for an electrophotographic method and an inkjet method may deteriorate the image quality and lower the extraction accuracy. Hence, to maintain high extraction accuracy, the mobile terminal that executes the reading needs to perform appropriate processes according to the printing method of the document.

For example, for a document printed on ordinary paper by an inkjet method, turning on the flash increases the accuracy of extraction of the document ID information in a dark portion. On the other hand, for a document printed by an electrophotographic method, turning on the flash may generate a blown-out highlight at a dark portion and lower the accuracy of extraction therefrom. In other words, with an inkjet method, capturing an image with the flash on allows for higher extraction accuracy than with the flash off. It is therefore preferable to capture an image with the flash on. On the other hand, with an electrophotographic method, capturing an image with the flash on lowers the accuracy of extraction from a dark portion. It is therefore preferable to capture an image with the flash off. In the present embodiment, a description will be given of a method in which the user designates the printing method by which a document was printed to switch control for obtaining an image.

FIG. 16 illustrates a flowchart of extracting document ID information from a document printed by an electrophotographic method or an inkjet method by using the mobile terminal 130. Note that, like FIG. 14 , the flow in FIG. 16 is a flow in which the camera 1307 of the mobile terminal 130 is used to perform the document reading process to the document ID information extraction process described in S811 to S813 in FIG. 8 . While the mobile terminal 130 actually performs the processes of S811 to S821 in FIG. 8 , description of the processes of S814 and the subsequent steps is omitted in the present embodiment since these are similar to the processes performed using the PC 20. Note that the CPU 1301 of the mobile terminal 130 performs the processes of the steps in FIG. 16 by loading program code stored in the ROM 1302 to the RAM 1303 and executing it.

In S1601, the user inputs information on the printing method of the document to be imaged with a user operation on the touch panel via the display I/F 1305 of the mobile terminal 130. In the present embodiment, the user inputs either an electrophotographic method or an inkjet method.

In S1602, the mobile terminal 130 determines whether to use the flash function in the reading of the document based on the printing method of the document input by the user in S1601. If the printing method input by the user is an inkjet method, the mobile terminal 130 proceeds to S1603 to read the document with the flash function enabled. If the document was printed by an electrophotographic method, the document will be read with the flash function disabled. That is, the mobile terminal 130 proceeds to S1604.

In S1603, in response to a user operation, the mobile terminal 130 captures an image of the document with the flash on. In S1604, in response to a user operation, the mobile terminal 130 captures an image of the document with the flash off

In S1605, the mobile terminal 130 digitalizes the analog electrical signals of the printed document imaged in S1603 or S1604 to obtain a bitmap image.

In S1606, the mobile terminal 130 extracts the document ID information from the bitmap image obtained in S1605.

The subsequent processes are processes similar to S814 to S821 in FIG. 8 , and description thereof is therefore omitted.

As described above, according to the present embodiment, the user designates the method by which a document was printed, and the image capture control for obtaining an image from which to extract the document ID is switched based on the method. In this way, it is possible to avoid an image quality deterioration such as a blown-out highlight generated at a dark portion when the printed document is read. Accordingly, the extraction accuracy can be prevented from being lowered. Note that in the present embodiment, a method in which a mobile terminal is used with its flash on or off has been described. Alternatively, a scanner may be used to scan a document with setting of a different amount of light to thereby obtain an image from which to extract the document ID information.

Embodiment 3

In the following, a description will be given of a method of extracting document ID information from a printed document by using a mobile terminal in a case where a dark portion and a highlight portion are both present in the printed document. A highlight portion refers to a region in a printed document where the value of brightness is a certain value or more.

In a case where a document was printed by an inkjet method, the accuracy of extraction from both a dark portion and a highlight portion will be higher by capturing an image with the flash on at the time of reading. On the other hand, in a case where a document was printed by an electrophotographic method, the accuracy of extraction from a dark portion will be higher by capturing an image with the flash off at the time of reading, and the accuracy of extraction from a highlight portion will be higher by capturing an image with the flash on at the time of reading. Thus, for a document printed by an inkjet method, the document ID information is extracted from an image captured with the flash on. For a document printed by an electrophotographic method, the document ID information is extracted by using both an image captured with the flash on and an image captured with the flash off. Specifically, the image captured with the flash on and the image captured with the flash off are read, and the dark portion and the highlight portion are combined to create an image from which to extract the document ID information. Then, the document ID information is extracted from the created image. The present embodiment will now be specifically described.

FIG. 17 illustrates a flow of switching the document ID information extraction method based on a printing method designated by the user. Note that, like FIG. 14 , the flow in FIG. 17 is a flow in which the camera 1307 of the mobile terminal 130 is used to perform the document reading process to the document ID information extraction process described in S811 to S813 in FIG. 8 . While the mobile terminal 130 actually performs the processes of S811 to S821 in FIG. 8 , description of the processes of S814 and the subsequent steps is omitted in the present embodiment since these are similar to the processes performed using the PC 20.

In S1701, the user inputs information on the printing method of the document to be imaged with a user operation on the touch panel via the display I/F 1305 of the mobile terminal 130. In the present embodiment, the user inputs either an electrophotographic method or an inkjet method.

In S1702, in response to a user operation, the mobile terminal 130 captures an image of a document with the flash on. In S1703, the mobile terminal 130 digitalizes the analog electrical signals of the printed document imaged in S1702 to obtain a bitmap image.

In S1704, the mobile terminal 130 switches the document ID information extraction method based on the printing method of the document input by the user in S1701. The mobile terminal 130 proceeds to S1705 if the printing method input by the user is an inkjet method, and proceeds to S1706 if the document was printed by an electrophotographic method.

In S1705, the mobile terminal 130 extracts the document ID information from the bitmap image obtained in S1703 from the image of the document captured with the flash on. Note that the extraction method in this step will be referred to as “method 1”.

In S1706, in response to a user operation, the mobile terminal 130 captures an image of the document with the flash off.

In S1707, the mobile terminal 130 digitalizes the analog electrical signals of the printed document imaged in S1706 to obtain a bitmap image. Here, for a simple description, suppose that the bitmap image obtained from the image captured with the flash on and the bitmap image obtained from the image captured with the flash off have the same image size, and there is no misalignment of the document at the time of capturing the images or the like.

In S1708, the mobile terminal 130 extracts the document ID information by utilizing the two images, namely the bitmap image obtained in S1703 from the image of the document captured with the flash on and the bitmap image obtained in S1707 from the image of the document captured with the flash off. Note that the extraction method in this step will be referred to as “method 2”. As the subsequent processes, similar processes to S814 to S821 in FIG. 8 are performed. The above is the description of the flow of switching the document ID information extraction method based on the printing method designated by the user.

A description will now be given of details of the method 2, i.e., a method involving comparing the flash-on image and the flash-off image on a pixel-by-pixel basis, creating a combined image from which to extract the document ID based on the comparison result, and extracting the document ID from the combined image.

FIG. 18 illustrates a flow in which the mobile terminal 130 creates a combined image for extraction by comparing a flash-on image and a flash-off image.

In S1801, the mobile terminal 130 calculates the average luminance of each of the entire flash-on image and the entire flash-off image, and holds the difference (Dth) between the average luminances. In S1802, the mobile terminal 130 initializes the values of coordinates (x, y) for comparing the flash-on image and the flash-off image on a pixel-by-pixel basis, and designates these values as initial coordinates. In S1803, the mobile terminal 130 calculates a difference D (x, y) between the luminance value of the flash-on image and the luminance value of the flash-off image at the coordinates designated in S1802 (e.g., (0, 0)).

In S1804, the mobile terminal 130 determines whether the difference value D (x, y) calculated in S1803 is greater than the average luminance difference Dth calculated in S1801. If the result of the determination is YES (i.e., D (x, y)>Dth), the mobile terminal 130 proceeds to S1805. If the result of the determination is NO (i.e., D (x, y)<Dth), the mobile terminal 130 proceeds to S1806.

In S1805, the mobile terminal 130 sets the pixel value obtained with the flash on as the pixel value of the combined image at the designated coordinates. Specifically, since the difference between the luminance with the flash on and the luminance with the flash off at the designated coordinates is greater than the average luminance difference, the mobile terminal 130 determines that a blown-out highlight is generated at the designated coordinate position. Thus, for this set of coordinates, the mobile terminal 130 uses the flash-off image, which causes a less image quality deterioration, as the combined image.

In S1806, the mobile terminal 130 sets the pixel value obtained with the flash off as the pixel value of the combined image at the designated coordinates. Specifically, since the difference between the luminance with the flash on and the luminance with the flash off is less than or equal to the average luminance difference, the mobile terminal 130 determines that no blown-out highlight is generated at the designated coordinate position. Thus, for this set of coordinates, the mobile terminal 130 uses the flash-on image, which will increase the extraction accuracy, as the combined image.

In S1807, the mobile terminal 130 determines whether combined images have been generated for all pixels. The mobile terminal 130 proceeds to S1809 if YES, and proceeds to S1808 if NO. In S1808, the mobile terminal 130 updates the position of the designated coordinates at which to generate a combined image. After the update, the mobile terminal 130 returns to S1803, and repeats similar processes.

In S1809, the mobile terminal 130 performs a document ID information extraction process by using the combined images created by the luminance comparison of all pixels in the printed document.

The above is the description of the method involving comparing the flash-on image and the flash-off image on a pixel-by-pixel basis, creating a combined image from which to extract the document ID based on the comparison result, and extracting the document ID from the combined image. By determining for each set of designated coordinates whether the difference at the set of designated coordinates is greater than the average luminance difference, it is possible to eliminate a cause of local image quality deteriorations including blown-out highlights. Accordingly, the extraction accuracy is expected to improve.

In the above, a method has been described in which the image for creating a combined image is switched based on the difference between the flash-on image and the flash-off image. Alternatively, a method may be employed in which, for each pixel, whether it is a dark portion is determined, and the image to be used is switched to the flash-on image or the flash-off image based on the determination result. This limits the use of the flash-off image to the dark portion, increases regions for which to use the flash-on image. Accordingly, the extraction accuracy is expected to improve further.

As described above, according to the present embodiment, in a case where a printed document includes both a dark portion and a highlight portion, the document ID information extraction method can be switched according to the printing method designated by the user. In particular, in a case of extracting a document ID from a document printed by an electrophotographic method, whether a blown-out highlight is generated is determined, and a flash-on image and a flash-off image are combined by determining whether a blown-out highlight is generated, and the document ID is extracted from the combined image. In this way, the region of the flash-off image can be limited. Accordingly, the extraction accuracy can be prevented from being lowered. Note that in the above, a method in which a mobile terminal is used with its flash on and off has been described. Alternatively, a scanner may be used to scan a document with setting of different amounts of light, and the image from which to extract the document ID information may be obtained from the scanned images.

Embodiment 4

In the present embodiment, a description will be given of a method in which the method by which a printed document was printed is determined from the printed document after being read, instead of from a method manually set by the user. Suppose that the printing method is determined between two types of methods, an inkjet method and an electrophotographic method.

FIG. 19 illustrates a flow in which a mobile terminal captures an image with its flash on and an image with the flash off, determines the printing method by using these images, and switches the method of extracting the document ID information based on the determined printing method. Note that, like FIG. 14 , the flow in FIG. 19 is a flow in which the camera 1307 of the mobile terminal 130 is used to perform the document reading process to the document ID information extraction process described in S811 to S813 in FIG. 8 . While the mobile terminal 130 actually performs the processes of S811 to S821 in FIG. 8 , description of the processes of S814 and the subsequent steps is omitted in the present embodiment since these are similar to the processes performed using the PC 20.

In S1901, in response to a user operation, the mobile terminal 130 captures an image of a document with the flash on. In S1902, the mobile terminal 130 digitalizes the analog signals of the printed document imaged in S1901 to obtain a flash-on bitmap image.

In S1903, in response to a user operation, the mobile terminal 130 captures an image of the document with the flash off. In S1904, the mobile terminal 130 digitalizes the analog signals of the printed document imaged in S1903 to obtain a flash-off bitmap image. Here, for a simple description, suppose that the bitmap image obtained from the image captured with the flash on and the bitmap image obtained from the image captured with the flash off have the same image size, and there is no misalignment of the document at the time of capturing the images or the like.

In S1905, the mobile terminal 130 determines the printing method of the document by utilizing the flash-on image and the flash-off image obtained in S1902 and S1904. The determination method will now be specifically described using FIG. 20 .

FIG. 20 illustrates a flow of determining the printing method using the flash-on image and the flash-off image. The determination of the printing method utilizes the generation of a blown-out highlight when a document printed by an electrophotographic method is read with the flash on. In a case where a blown-out highlight is generated, the printing method is determined to be an electrophotographic method. In a case where no blown-out highlight is generated, the printing method is determined to be an inkjet method.

In S2001, the mobile terminal 130 calculates the average luminance of each of the entire flash-on image and the entire flash-off image, and holds the difference (Dth) between the average luminances. In S2002, the mobile terminal 130 resets a counter that counts the number of pixels determined as a blown-out highlight. The mobile terminal 130 also initializes the values of coordinates (x, y) for comparing the flash-on image and the flash-off image on a pixel-by-pixel basis, and designates these values as initial coordinates.

In S2003, the mobile terminal 130 calculates a difference D (x, y) between the luminance value of the flash-on image and the luminance value of the flash-off image at the designated coordinates. In S2004, the mobile terminal 130 determines whether the difference value D (x, y) calculated in S2003 is greater than the average luminance difference Dth calculated in S2001. If the result of the determination is YES (i.e., D (x, y)>Dth), the mobile terminal 130 proceeds to S2005. If the result of the determination is NO (i.e., D (x, y)<Dth), the mobile terminal 130 proceeds to S2006.

In S2005, the mobile terminal 130 increments the count by one. This is because the difference between the flash-on image and the flash-off image is greater than the average luminance difference and it is therefore determined that a blown-out highlight is generated at the designated coordinate position. In S2006, the mobile terminal 130 determines whether combined images have been generated for all pixels. The mobile terminal 130 proceeds to S2008 if YES, and proceeds to S2007 if NO.

In S2007, the mobile terminal 130 updates the position of the designated coordinates where whether a blown-out highlight is generated is to be determined. After the update, the mobile terminal 130 returns to S2003, and repeats similar processes. In S2008, the mobile terminal 130 counts the number of blown-out highlights among all pixels, and determines whether or not the counted number of blown-out highlight pixels is more than or equal to a predetermined threshold value TH. The predetermined threshold value TH is set according to the number of pixels in the dark portion of the printed document. As for the dark portion of the printed document, a shadow point is set from a luminance histogram of the flash-off image, and the number of pixels with luminance values at or below the shadow point is counted. To leave a margin, the obtained number of dark-portion pixels may be multiplied by a predetermined ratio. The mobile terminal 130 proceeds to S2009 if the determination result is YES (i.e., blown-out highlight counter>TH), and proceeds to S2010 if NO (i.e., blown-out highlight counter<TH).

In S2009, the mobile terminal 130 determines that the printed document was printed by an electrophotographic method since a blown-out highlight is likely to have been generated, and returns to the flow in FIG. 19 .

In S2010, the mobile terminal 130 determines that the printed document was printed by an inkjet method since no blown-out highlight is likely to have been generated, and returns to the process flow in FIG. 19 . The above is the description of the flow of determining the printing method using the flash-on image and the flash-off image.

The description now returns to FIG. 19 . In S1906, the mobile terminal 130 switches the process based on the printing method of the document determined in S1905. The mobile terminal 130 proceeds to S1907 if the printing method determined in S1905 is an inkjet method, and proceeds to S1908 if the printing method is an electrophotographic method.

In S1907, the mobile terminal 130 extracts the document ID information by using the “method 1” described in Embodiment 3. On the other hand, in S1908, the mobile terminal 130 extracts the document ID information by using the “method 2” described in Embodiment 3.

The above is the description of the flow for capturing an image with the flash on and an image with the flash off, determining the printing method by using these images, and switching the document ID information extraction method based on the determined printing method. According to the present embodiment, it is the mobile terminal 130, not the user, that determines the printing method of a printed document at the time of reading its document ID information. This saves the user's effort. Also, the printing method is mechanically determined by using the flowchart of FIG. 20 , not based on the user's decision. This improves the accuracy of extraction of the document ID information.

Note that in the present embodiment, an example has been described in which whether the printing method of a document is an electrophotographic method or an inkjet method is determined by comparing a flash-on image and a flash-off image. However, how to determine the printing method is not limited to this method. The screen ruling in an image captured may be subjected to a pattern analysis, and the printing method may be determined as an electrophotographic method in a case where a screen is confirmed. Alternatively, whether the printing method is an inkjet method or an electrophotographic method may be determined from the contrast ratio of the paper white and a black character figured out in advance. Also, in a case of using ordinary paper coated in advance with a clear ink, the printing method may be determined as an electrophotographic method by the above-described method even if the printing method was actually an inkjet method, and an extraction process based on the determination result may be performed. The coating may cause a blown-out highlight if the flash is on. Thus, in this case, an extraction process using the image captured with the flash off is preferable, as in the case of using an electrophotographic method.

OTHER EMBODIMENTS

In the description of the above-described embodiments, a mobile terminal reads a printed document and extracts its document ID information. However, the configuration is not limited to this. For example, an apparatus equipped with an image capture function or a copy function, such as a digital camera or a copier, may be used. Also, regarding the flash function used for reading with a mobile terminal, another method may be used to apply light to the printed document.

Moreover, in the above-described embodiments, a rendered image obtained by performing rendering based on a PDL is used as image data to be used in printing and to be embedded with embedded information. However, the configuration is not limited to this. For example, the configuration may be such that the PC 20 embeds the embedded information into RGB image data externally obtained via USB, IEEE 1394, or a LAN. Also, as described above, the embedded information is not limited to a form that certifies an original. It suffices that predetermined information be embedded in a sheet in such a form as to be difficult to visually recognize for the user.

Embodiment(s) of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.

While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

This application claims the benefit of Japanese Patent Application No. 2021-178183, filed Oct. 29, 2021, which is hereby incorporated by reference wherein in its entirety. 

What is claimed is:
 1. An image processing apparatus for extracting embedded information from a printed document, comprising: a first obtaining unit configured to obtain a printing method of the printed document; a second obtaining unit capable of obtaining first image data by reading the printed document while applying light to the printed document; a third obtaining unit capable of obtaining second image data by reading the printed document without applying light to the printed document; and an extraction unit configured to extract the embedded information by using at least one of the first image data and the second image data according to the printing method obtained by the first obtaining unit.
 2. The image processing apparatus according to claim 1, wherein the printing method is an inkjet method or an electrophotographic method.
 3. The image processing apparatus according to claim 1, wherein the extraction unit extracts the embedded information by using the first image data in a case where the printing method obtained by the first obtaining unit is an inkjet method, or extracts the embedded information by using the second image data in a case where the printing method is an electrophotographic method.
 4. The image processing apparatus according to claim 1, wherein the extraction unit extracts the embedded information by using both the first image data and the second image data in a case where the printing method obtained by the first obtaining unit is an electrophotographic method.
 5. The image processing apparatus according to claim 4, wherein the extraction unit combines the first image data and the second image data based on a comparison between a difference in luminance of each pixel between the first image data and the second image data and a difference in average luminance of an entire image between the first image data and the second image data, and extracts the embedded information from the combined image data.
 6. The image processing apparatus according to claim 1, wherein the first obtaining unit obtains the printing method by receiving an instruction from a user.
 7. The image processing apparatus according to claim 1, wherein the first obtaining unit obtains the printing method of the printed document by determining the printing method based on the first image data and the second image data, and the extraction unit extracts the embedded information by using the image data corresponding to the printing method obtained by the determining.
 8. The image processing apparatus according to claim 1, wherein the image processing apparatus has an image capture function.
 9. The image processing apparatus according to claim 1, wherein the application of light is controlled by switching on or off a flash.
 10. The image processing apparatus according to claim 1, wherein the second obtaining unit and the third obtaining unit read the printed document by capturing an image thereof a plurality of times with setting of different amounts of light for the light to be applied.
 11. The image processing apparatus according to claim 1, wherein the second obtaining unit and the third obtaining unit read the printed document by scanning the printed document a plurality of times with setting of different amounts of light.
 12. The image processing apparatus according to claim 1, wherein the embedded information is information indicating genuineness of the printed document.
 13. A method of controlling an image processing apparatus for extracting embedded information from a printed document, the method comprising: obtaining a printing method of the printed document; obtaining first image data by reading the printed document while applying light to the printed document; obtaining second image data by reading the printed document without applying light to the printed document; and extracting the embedded information by using image data corresponding to the printing method obtained by the obtaining a printing method.
 14. The method of controlling an image processing apparatus according to claim 13, wherein the printing method is an inkjet method or an electrophotographic method.
 15. The method of controlling an image processing apparatus according to claim 13, wherein the extracting includes extracting the embedded information by using the first image data in a case where the printing method obtained by the obtaining a printing method is an inkjet method, and extracting the embedded information by using the second image data in a case where the printing method is an electrophotographic method.
 16. The method of controlling an image processing apparatus according to claim 13, wherein the extracting includes extracting the embedded information by using both the first image data and the second image data in a case where the printing method obtained by the obtaining a printing method is an electrophotographic method.
 17. The method of controlling an image processing apparatus according to claim 16, wherein the extracting includes combining the first image data and the second image data based on a comparison between a difference in luminance of each pixel between the first image data and the second image data and a difference in average luminance of an entire image between the first image data and the second image data, and extracting the embedded information from the combined image data.
 18. The method of controlling an image processing apparatus according to claim 13, wherein the obtaining a printing method includes obtaining the printing method by receiving an instruction from a user.
 19. The method of controlling an image processing apparatus according to claim 13, wherein the obtaining a printing method includes obtaining the printing method of the printed document by determining the printing method based on the first image data and the second image data, and the extracting includes extracting the embedded information by using the image data corresponding to the printing method obtained by the determining.
 20. The method of controlling an image processing apparatus according to claim 13, wherein the image processing apparatus has an image capture function. 